﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using FightTheDragon.Interface;


namespace FightTheDragon.Managers
{
    class InterfaceManager
    {
        private static InterfaceManager m_Instance = new InterfaceManager();
        private List<BaseInterfaceObjects> m_Objects;

        public List<BaseInterfaceObjects> Objects
        {
            get { return m_Objects; }
            set { m_Objects = value;}
        }

        public static InterfaceManager Instance
        {
            get { return m_Instance; }
        }

        private InterfaceManager()
        {
            m_Objects = new List<BaseInterfaceObjects>();
        }

        public void Add(BaseInterfaceObjects Addme)
        {
            m_Objects.Add(Addme);
        }
        public void Remove(BaseInterfaceObjects Removeme)
        {
            m_Objects.Remove(Removeme);
        }
        public void RemoveAll()
        {
            m_Objects.Clear();
        }
        public void Render()
        {
            foreach (BaseInterfaceObjects B in m_Objects)
                B.Render();
        }
        public void Update(float gTime)
        {
            foreach (BaseInterfaceObjects B in m_Objects)
                B.Update(gTime);
        }

    }
}
